home *** CD-ROM | disk | FTP | other *** search
- /*
- COMPOUND SOLIDS for POV-Ray 2.2
- ===============================
- Constructed by Grant Hutchison [100047,144]
- Much data and encouragement from Tom Gettys [72730,2013]
- Other data from "Polyhedron Models" by Magnus Wenninger
-
- Compounds and intersections of the simple Platonic solids
- can be used to generate several interesting shapes which
- highlight the relationships between the Platonics. Several
- compounds are declared below, with their component solids
- coloured to show up clearly. In each case, the vertices
- of the component solids define one regular shape, while
- their intersection defines another. (It is interesting
- to convert "union" to "intersection" and look at the
- results.)
- The file starts with the declaration of the unit solids
- necessary to create the compounds.
- */
-
- #include "colors.inc"
-
- //UNIT SOLIDS
- //These solids are based on those created by Tom Price
- //for the shapes2.inc file, but some of the angles and
- //orientations are different.
-
- #declare Unit_Tetrahedron =
- intersection {
- plane { -z, 1 rotate <35.264390, 45, 0> }
- plane { -z, 1 rotate <35.264390, 225, 0> }
- plane { -z, 1 rotate <-35.264390, 135, 0> }
- plane { -z, 1 rotate <-35.264390, 315, 0> }
- }
-
- #declare Unit_Cube =
- box { <-1, -1, -1>, <1, 1, 1> }
-
- #declare Unit_Octahedron =
- intersection {
- plane { -z, 1 rotate <35.264390, 45, 0> }
- plane { -z, 1 rotate <35.264390, 135, 0> }
- plane { -z, 1 rotate <35.264390, 225, 0> }
- plane { -z, 1 rotate <35.264390, 315, 0> }
- plane { -z, 1 rotate <-35.264390, 45, 0> }
- plane { -z, 1 rotate <-35.264390, 135, 0> }
- plane { -z, 1 rotate <-35.264390, 225, 0> }
- plane { -z, 1 rotate <-35.264390, 315, 0> }
- }
-
- #declare Unit_Dodecahedron =
- intersection {
- plane { -z, 1 rotate <26.565051, 36, 0> }
- plane { -z, 1 rotate <26.565051, 108, 0> }
- plane { -z, 1 rotate <26.565051, 180, 0> }
- plane { -z, 1 rotate <26.565051, 252, 0> }
- plane { -z, 1 rotate <26.565051, 324, 0> }
- plane { -z, 1 rotate <-26.565051, 0, 0> }
- plane { -z, 1 rotate <-26.565051, 72, 0> }
- plane { -z, 1 rotate <-26.565051, 144, 0> }
- plane { -z, 1 rotate <-26.565051, 216, 0> }
- plane { -z, 1 rotate <-26.565051, 288, 0> }
- plane { -z, 1 rotate -90*x }
- plane { -z, 1 rotate 90*x }
- }
-
- #declare Unit_Icosahedron =
- intersection {
- plane { -z, 1 rotate <52.622632, 0, 0> }
- plane { -z, 1 rotate <52.622632, 72, 0> }
- plane { -z, 1 rotate <52.622632, 144, 0> }
- plane { -z, 1 rotate <52.622632, 216, 0> }
- plane { -z, 1 rotate <52.622632, 288, 0> }
- plane { -z, 1 rotate <10.812317, 0, 0> }
- plane { -z, 1 rotate <10.812317, 72, 0> }
- plane { -z, 1 rotate <10.812317, 144, 0> }
- plane { -z, 1 rotate <10.812317, 216, 0> }
- plane { -z, 1 rotate <10.812317, 288, 0> }
- plane { -z, 1 rotate <-10.812317, 36, 0> }
- plane { -z, 1 rotate <-10.812317, 108, 0> }
- plane { -z, 1 rotate <-10.812317, 180, 0> }
- plane { -z, 1 rotate <-10.812317, 252, 0> }
- plane { -z, 1 rotate <-10.812317, 324, 0> }
- plane { -z, 1 rotate <-52.622632, 36, 0> }
- plane { -z, 1 rotate <-52.622632, 108, 0> }
- plane { -z, 1 rotate <-52.622632, 180, 0> }
- plane { -z, 1 rotate <-52.622632, 252, 0> }
- plane { -z, 1 rotate <-52.622632, 324, 0> }
- }
-
- // COMPOUNDS
-
- #declare Two_Tetrahedra =
- //Intersection defines an octahedron
- //Vertices define a cube
- union {
- object {Unit_Tetrahedron pigment {color White}}
- object {Unit_Tetrahedron rotate 90*y pigment {color Blue}}
- scale <0.577350, 0.577350, 0.577350>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Tetrahedra =
- //Intersection defines an icosahedron
- //Vertices define a dodecahedron
- union {
- object {Unit_Tetrahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Tetrahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Tetrahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Tetrahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Tetrahedron rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.419469, 0.419469, 0.419469>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Ten_Tetrahedra =
- //Intersection defines an icosahedron
- //Vertices define a dodecahedron
- union {
- object {Unit_Tetrahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Tetrahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Tetrahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Tetrahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Tetrahedron rotate <31.717474, 288, 0> pigment {color Green}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 0, 0> pigment {color Yellow}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 72, 0> pigment {color Orange}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 144, 0> pigment {color Cyan}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 216, 0> pigment {color Pink}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 288, 0> pigment {color Grey}}
- scale <0.419469, 0.419469, 0.419469>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Cubes =
- //Intersection defines a rhombic triacontahedron
- //Vertices define a dodecahedron
- union {
- object { Unit_Cube rotate <31.717474, 0, 0> pigment {color White}}
- object { Unit_Cube rotate <31.717474, 72, 0> pigment {color Blue}}
- object { Unit_Cube rotate <31.717474, 144, 0> pigment {color Magenta}}
- object { Unit_Cube rotate <31.717474, 216, 0> pigment {color Red}}
- object { Unit_Cube rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.726542, 0.726542, 0.726542>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Octahedra =
- //Intersection defines an icosahedron
- // Vertices define an icos1dodecahedron
- union {
- object {Unit_Octahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Octahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Octahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Octahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Octahedron rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.678716, 0.678716, 0.678716>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Octahedron_Cube =
- //Intersection defines a cuboctahedron
- //Vertices define a rhombic dodecahedron
- union {
- object {Unit_Cube pigment {color Blue}}
- object {Unit_Octahedron scale <1.154700, 1.154700, 1.154700> pigment {color White}}
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Icosahedron_Dodecahedron =
- //Intersection defines an icosidodecahedron
- //Vertices define a rhombic triacontahedron
- union {
- object {Unit_Dodecahedron pigment {color Red}}
- object {Unit_Icosahedron scale <1.098014, 1.098014, 1.098014> pigment {color Green}}
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Two_Tetrahedra_i =
- //Intersection defines an octahedron
- //Vertices define a cube
- intersection {
- object {Unit_Tetrahedron pigment {color White}}
- object {Unit_Tetrahedron rotate 90*y pigment {color Blue}}
- scale <0.577350, 0.577350, 0.577350>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Tetrahedra_i =
- //Intersection defines an icosahedron
- //Vertices define a dodecahedron
- intersection {
- object {Unit_Tetrahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Tetrahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Tetrahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Tetrahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Tetrahedron rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.419469, 0.419469, 0.419469>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Ten_Tetrahedra_i =
- //Intersection defines an icosahedron
- //Vertices define a dodecahedron
- intersection {
- object {Unit_Tetrahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Tetrahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Tetrahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Tetrahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Tetrahedron rotate <31.717474, 288, 0> pigment {color Green}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 0, 0> pigment {color Yellow}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 72, 0> pigment {color Orange}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 144, 0> pigment {color Cyan}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 216, 0> pigment {color Pink}}
- object {Unit_Tetrahedron rotate 90*y rotate <31.717474, 288, 0> pigment {color Grey}}
- scale <0.419469, 0.419469, 0.419469>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Cubes_i =
- //Intersection defines a rhombic triacontahedron
- //Vertices define a dodecahedron
- intersection {
- object { Unit_Cube rotate <31.717474, 0, 0> pigment {color White}}
- object { Unit_Cube rotate <31.717474, 72, 0> pigment {color Blue}}
- object { Unit_Cube rotate <31.717474, 144, 0> pigment {color Magenta}}
- object { Unit_Cube rotate <31.717474, 216, 0> pigment {color Red}}
- object { Unit_Cube rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.726542, 0.726542, 0.726542>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Five_Octahedra_i =
- //Intersection defines an icosahedron
- // Vertices define an icos1dodecahedron
- intersection {
- object {Unit_Octahedron rotate <31.717474, 0, 0> pigment {color White}}
- object {Unit_Octahedron rotate <31.717474, 72, 0> pigment {color Blue}}
- object {Unit_Octahedron rotate <31.717474, 144, 0> pigment {color Magenta}}
- object {Unit_Octahedron rotate <31.717474, 216, 0> pigment {color Red}}
- object {Unit_Octahedron rotate <31.717474, 288, 0> pigment {color Green}}
- scale <0.678716, 0.678716, 0.678716>
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Octahedron_Cube_i =
- //Intersection defines a cuboctahedron
- //Vertices define a rhombic dodecahedron
- intersection {
- object {Unit_Cube pigment {color Blue}}
- object {Unit_Octahedron scale <1.154700, 1.154700, 1.154700> pigment {color White}}
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- #declare Icosahedron_Dodecahedron_i =
- //Intersection defines an icosidodecahedron
- //Vertices define a rhombic triacontahedron
- intersection {
- object {Unit_Dodecahedron pigment {color Red}}
- object {Unit_Icosahedron scale <1.098014, 1.098014, 1.098014> pigment {color Green}}
- bounded_by { sphere { < 0, 0, 0 >, 1.8 } }
- }
-
- // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- // ADD A SCENE
- // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- global_settings { assumed_gamma 2.2 }
-
- camera {
- location < 20.0, 20.0, -60.0 >
- direction < 0.0, 0.0, 6.0 >
- up < 0.0, 1.0, 0.0 >
- right < 1.33333, 0.0, 0.0 >
- look_at < 0.0, 0.0, 0.0 >
- }
-
- light_source { < 100.0, 100.0, -100.0 > colour rgb 1 }
-
- light_source { < -100.0, 0.0, -50.0 > colour rgb 0.5 }
-
- object { Two_Tetrahedra translate < -6.0, 3.0, 0.0 > }
- object { Five_Tetrahedra translate < -3.0, 3.0, 0.0 > }
- object { Ten_Tetrahedra translate < 0.0, 3.0, 0.0 > }
- object { Five_Cubes translate < 3.0, 3.0, 0.0 > }
- object { Five_Octahedra translate < 6.0, 3.0, 0.0 > }
-
- object { Octahedron_Cube translate < -6.0, 0.0, 0.0 > }
- object { Icosahedron_Dodecahedron translate < -3.0, 0.0, 0.0 > }
-
- object { Two_Tetrahedra_i translate < 3.0, 0.0, 0.0 > }
- object { Five_Tetrahedra_i translate < 6.0, 0.0, 0.0 > }
-
- object { Ten_Tetrahedra_i translate < -6.0, -3.0, 0.0 > }
- object { Five_Cubes_i translate < -3.0, -3.0, 0.0 > }
- object { Five_Octahedra_i translate < 0.0, -3.0, 0.0 > }
- object { Octahedron_Cube_i translate < 3.0, -3.0, 0.0 > }
- object { Icosahedron_Dodecahedron_i translate < 6.0, -3.0, 0.0 > }
-
-